package game;
import com.golden.gamedev.object.Sprite;


public class BonusRewind extends AbstractBonus
{
	private static final long serialVersionUID = 1L;
	private double time_rewind;
    public BonusRewind (ProgBob progBob, String name, Sprite icon)
    {
        super(progBob, name, icon);
    }
    
    public BonusRewind(){
    	time_rewind = 0;
    	new BonusRewind(super.progBob, "Rewind", new Sprite(createBufferedImage("resources/bonus_rewind.png")));
    }

    @Override
    public void toggleBonus()
    {
        if (time_rewind > 0){
            time_rewind = 3;
        }
        else{
            time_rewind = 4;
        }
    }
    
    @Override
    protected void setBonusPosition(int mouseX, int mouseY, int offset){}
    
	@Override
	public boolean isOn() {
		return bonusBoolean;
	}
	
	@Override
	public void turnOff() {
		time_rewind = 0;
		bonusBoolean = false;
	}

	@Override
	public void turnOn() {
		bonusBoolean = true;
	}
}
